package com.weixin.paleituo.adapter;

import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.weixin.paleituo.factory.OrderFragmentFactory;

/**
 * Author yichao
 * Time  2018/4/7 15:43
 * Dest  订单
 *
 */

public class MyOrderPagerAdapter extends FragmentPagerAdapter {
    private String[] mMyOrderTitles;

    public MyOrderPagerAdapter(FragmentManager fm, String[] myOrderTitles, String userId) {
        super(fm);
        mMyOrderTitles = myOrderTitles;
    }
    @Override
    public Fragment getItem(int position) {
        return OrderFragmentFactory.getFragment(position);
    }

    @Override
    public int getCount() {
        return mMyOrderTitles.length;
    }
    @Nullable
    @Override
    public CharSequence getPageTitle(int position) {
        return mMyOrderTitles[position];
    }


}
